import socialApi from "@/api/declaration/socialApi"
import httpRequest from "@/config/axios/httpRequest"


// 社交绑定，使用 code 授权码
export const socialBind = (type, code, state) => {
  return httpRequest.post(socialApi.SocialBind,{type,code,state})
}

// 取消社交绑定
export const socialUnbind = (type, openid) => {
  return httpRequest.delete(socialApi.SocialUnbind,{params:{type,openid}})
}

// 社交授权的跳转
export const socialAuthRedirect = (type, redirectUri) => {
  return httpRequest.get(socialApi.SocialAuthRedirect,{params:{type,redirectUri}})
}
